load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "scbackup",
    srcs = [
        "doc.go",
        "job.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbackup",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/jobs",
        "//pkg/jobs/jobspb",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/catpb",
        "//pkg/sql/catalog/nstree",
        "//pkg/sql/isql",
        "//pkg/sql/schemachanger/scexec",
        "//pkg/sql/schemachanger/scpb",
        "//pkg/sql/schemachanger/screl",
    ],
)

go_test(
    name = "scbackup_test",
    srcs = [
        "job_test.go",
        "main_test.go",
    ],
    deps = [
        ":scbackup",
        "//pkg/base",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/server",
        "//pkg/sql",
        "//pkg/sql/catalog/dbdesc",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/nstree",
        "//pkg/sql/catalog/tabledesc",
        "//pkg/sql/isql",
        "//pkg/sql/schemachanger/scpb",
        "//pkg/testutils/serverutils",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "@com_github_stretchr_testify//require",
    ],
)
